<?php
namespace addon\mall\validate;
use app\common\validate\ValidateBase;
use think\Db;
class GoodsBrand extends ValidateBase
{
    // 验证规则
    protected $rule = [
        'name'                   => 'require|unique:goods_brand',
    ];

    // 验证提示
    protected $message = [
        'name.require'             => '品牌名称不能为空',
        'name.unique'              => '该品牌名称已经存在'
    ];

    // 应用场景
    protected $scene = [
        'add'=>['name'],
    ];
}